package com.zhentao.controller;

import com.zhentao.model.dto.order.OrderStatisticsDto;
import com.zhentao.model.vo.common.Result;
import com.zhentao.model.vo.common.ResultCodeEnum;
import com.zhentao.model.vo.order.OrderStatisticsVo;
import com.zhentao.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : mgh
 * @date : 2024-08-20 10:07
 * @effect : 当前类的作用是
 * @projectTeam :
 */
@RestController
@RequestMapping("/product/order/orderInfo")
public class OrderInfoController {
    @Autowired
    private OrderInfoService orderInfoService;

    @GetMapping("/getOrderStatisticsData")
    public Result getOrderStatisticsData(OrderStatisticsDto orderStatisticsDto){
        OrderStatisticsVo orderStatisticsVo = orderInfoService.getOrderStatisticsData(orderStatisticsDto);
        return Result.build(orderStatisticsVo , ResultCodeEnum.SUCCESS) ;
    }
}
